﻿<UserControl
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:InheritedFrameworkControls="clr-namespace:CustomControls.InheritedFrameworkControls"
             x:Class="CustomControls.TouchCombo.TouchComboBox"
             mc:Ignorable="d" Background="#CC64004F" >
  <UserControl.Resources>
    <Style x:Key="ComboTitleStyle" TargetType="{x:Type InheritedFrameworkControls:TouchToggleButton}">
      <Setter Property="FocusVisualStyle">
        <Setter.Value>
          <Style>
            <Setter Property="Control.Template">
              <Setter.Value>
                <ControlTemplate>
                  <Rectangle Margin="2" SnapsToDevicePixels="True" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
                </ControlTemplate>
              </Setter.Value>
            </Setter>
          </Style>
        </Setter.Value>
      </Setter>
      <Setter Property="Background" Value="#CC64004F" />
      <Setter Property="FontFamily" Value="./#MOUSE DECO"/>
      <Setter Property="FontSize" Value="21"/>
      <Setter Property="Foreground" Value="white"/>
      <Setter Property="BorderBrush" Value="#FF707070"/>
      <Setter Property="BorderThickness" Value="1"/>
      <Setter Property="HorizontalContentAlignment" Value="Center"/>
      <Setter Property="VerticalContentAlignment" Value="Center"/>
      <Setter Property="Padding" Value="1"/>
      <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate TargetType="{x:Type InheritedFrameworkControls:TouchToggleButton}">
            <Border Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Background="{TemplateBinding Background}">
              <StackPanel Orientation="Horizontal" Margin="15,10">
                <ContentPresenter ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="0,0,-0.001,0" d:LayoutOverrides="Width"/>
                <Path Data="M34.833333,6.1666667 C45.833333,6.1666667 50.569059,6.202834 50.569059,6.202834 L43.069808,14.764852 z" Fill="#FFF4F4F5" Height="6.6" StrokeStartLineCap="Flat" Stretch="Fill" StrokeEndLineCap="Flat" Stroke="White" StrokeThickness="1" StrokeMiterLimit="10" StrokeLineJoin="Miter" Width="12.7" Margin="7,0,0,0" VerticalAlignment="Center"/>
              </StackPanel>
            </Border>
          </ControlTemplate>
        </Setter.Value>
      </Setter>
    </Style>
    <Style x:Key="ComboTouchRadioButtonStyle" TargetType="{x:Type InheritedFrameworkControls:TouchRadioButton}">
      <Setter Property="Background" Value="#CC64004F"/>
      <Setter Property="BorderBrush" Value="#FF8E8F8F"/>
      <Setter Property="BorderThickness" Value="1"/>
      <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate TargetType="{x:Type InheritedFrameworkControls:TouchRadioButton}">
            <Border x:Name="border">
              <ContentPresenter ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" RecognizesAccessKey="True" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="17,8,8,8"/>
            </Border>
            <ControlTemplate.Triggers>
              <Trigger Property="HasContent" Value="True">
                <Setter Property="FocusVisualStyle">
                  <Setter.Value>
                    <Style>
                      <Setter Property="Control.Template">
                        <Setter.Value>
                          <ControlTemplate>
                            <Rectangle Margin="14,0,0,0" SnapsToDevicePixels="True" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
                          </ControlTemplate>
                        </Setter.Value>
                      </Setter>
                    </Style>
                  </Setter.Value>
                </Setter>
                <Setter Property="FontFamily" Value="./#MOUSE DECO"/>
                <Setter Property="FontSize" Value="14"/>
                <Setter Property="Foreground" Value="White"/>
              </Trigger>
              <Trigger Property="IsChecked" Value="true">
                <Setter Property="Background" TargetName="border" Value="#CC64004F"/>
              </Trigger>
            </ControlTemplate.Triggers>
          </ControlTemplate>
        </Setter.Value>
      </Setter>
    </Style>
  </UserControl.Resources>
  <Border x:Name="border" BorderThickness="0">
    <Border.BorderBrush>
      <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#CC64004F" Offset="1"/>
        <GradientStop Color="#FF64004F"/>
      </LinearGradientBrush>
    </Border.BorderBrush>
    <StackPanel Orientation="Vertical">
      <InheritedFrameworkControls:TouchToggleButton x:Name="titleToggleButton" Checked="TitleToggleButtonChecked" Unchecked="TitleToggleButtonUnchecked" Content="{Binding SelectedTitle}" VerticalAlignment="Center" Style="{DynamicResource ComboTitleStyle}" Background="{x:Null}"/>
      <Border x:Name="optionsBorder" Width="0" Height="0">
        <StackPanel x:Name="itemsContainer" Orientation="Vertical" Margin="0">
        	
        </StackPanel>
      </Border>
    </StackPanel>
  </Border>
</UserControl>
